package org.sage.sdk.dada.order.aggregate;

import lombok.Getter;
import lombok.Setter;
import org.sage.sdk.dada.infrastructure.common.annotation.Aggregate;
import org.sage.sdk.dada.infrastructure.common.attributes.*;

import javax.validation.constraints.NotNull;

/**
 * 订单
 *
 * @author 周广明
 * @version v1 2019/12/10 下午4:48
 */
@Getter
@Setter
@Aggregate
public class Cargo {

    public Cargo(CargoPrice price) {
        this.price = price;
    }

    public Cargo(CargoNum num, CargoPrice price, CargoType type, CargoWeight weight) {
        this.num = num;
        this.price = price;
        this.type = type;
        this.weight = weight;
    }

    @NotNull
    CargoPrice price;

    CargoNum num;

    CargoType type;

    CargoWeight weight;
}
